import React from 'react';
import Button from './button'
class List extends React.Component {
    render() {
        let {list,onDel} = this.props;
        return <ul className=''>
            {
              list.map(item=><li key={item.id}>{item.str} <Button onClick={()=>{onDel(item)}}>X</Button></li>)
            }
        </ul>;
    }
}
export default List